<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="storageMaterialList.title"/></title>
    <meta name="heading" content="<fmt:message key='storageMaterialList.heading'/>"/>
    <meta name="menu" content="RoleMaterial"/>
</head>

<div id="help">
    <h2>
        <a href="<c:url value='helpStorageMaterialList.html?decorate=false'/>"
           title="Help storage material list"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
            <fmt:message key="help"/>
        </a>
    </h2>
</div>
<div>
    <fmt:message key="storageMaterial.allFound" />: ${smAllS}
    <br><br>
    <div style="border-color:red; color:blue">
        ${smAWarningS} <fmt:message key="storageMaterial.almostWarning" />: ${smAWarning}
    </div>
    <br>
    <div style="border-color:red; color:red">
        <img src="<c:url value="/images/alert.gif" />" alt="Edit" /> ${smWarningS} <fmt:message key="storageMaterial.allWarning" />: ${smWarning}
    </div>

</div>
<br><br>
<c:set var="buttons">

    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
           value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<s:set name="storageMaterials" value="storageMaterials" scope="request"/>
<br><br>
<display:table name="storageMaterials" class="table" requestURI="" id="storageMaterialList" export="true" pagesize="25">
    <display:column property="id" sortable="true" href="editStorageMaterial.html"
                    paramId="id" paramProperty="id" titleKey="storageMaterial.id"/>
    <display:column property="material.completeName" sortable="true" titleKey="storageMaterial.idMaterial.name"/>
    <display:column property="material.unitMeasure.description" sortable="true" titleKey="material.unitMeasureFull"/>
    <display:column property="stock" sortable="true" titleKey="storageMaterial.stock"/>
    <display:column property="limit" sortable="true" titleKey="storageMaterial.limit" />

    <display:setProperty name="paging.banner.item_name" value="storageMaterial"/>
    <display:setProperty name="paging.banner.items_name" value="storageMaterials"/>
    <display:setProperty name="paging.banner.all_items_found" value=""/>
    <display:setProperty name="export.excel.filename" value="StorageMaterial List.xls"/>
    <display:setProperty name="export.csv.filename" value="StorageMaterial List.csv"/>
    <display:setProperty name="export.pdf.filename" value="StorageMaterial List.pdf"/>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("storageMaterialList");
</script>